package com.yupixm.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yupixm.pojo.domain.User;

import javax.servlet.http.HttpServletRequest;

/**
 * @author su
 * @description 针对表【user】的数据库操作Service
 * @createDate 2022-07-08 16:21:18
 */
public interface UserService extends IService<User> {

    /**
     * 用户注册
     *
     * @param userAccount
     * @param userPassword
     * @param checkPassword
     * @return
     */
    public long userRegister(String userAccount, String userPassword, String checkPassword);


    /**
     * 用户登录
     *
     * @param userAccount
     * @param userPassword
     * @param request
     * @return
     */
    public User userLogin(String userAccount, String userPassword, HttpServletRequest request);


    /**
     * 用户脱敏
     *
     * @param originUser
     * @return
     */
    User getSafetyUser(User originUser);

    /**
     * 用户注销
     *
     * @param request
     * @return
     */
    int userLogout(HttpServletRequest request);
}
